package lab02.Test37;
import java.util.Scanner;
/**
 * Created by Administrator on 2017/11/14.
 */
public class StudentDemo {
       public static void main(String[] args) {
          Student[] students=new Student[5];
         students[0] = new Undergraduate();
          students[0].name="WW";
          students[0].sno="160610345";
        students[0].scores[0]=99;
        students[0].scores[1]=78;
        students[0].scores[2]=97;
        students[1]=new Undergraduate();
        students[1].name="LL";
        students[1].sno="257654478";
        students[1].scores[0]=66;
        students[1].scores[1]=99;
        students[1].scores[2]=88;
        students[2]=new Graduate();
        students[2].name="JJ";
        students[2].sno="24568943";
        students[2].scores[0]=76;
        students[2].scores[1]=70;
        students[2].scores[2]=69;
        students[3]=new Undergraduate();
        students[3].name="QQ";
        students[3].sno="2468953234";
        students[3].scores[0]=78;
        students[3].scores[1]=99;
        students[3].scores[2]=90;
        students[4]=new Graduate();
        students[4].name="GG";
        students[4].sno="158456785";
        students[4].scores[0]=68;
        students[4].scores[1]=92;
        students[4].scores[2]=89;
        System.out.println("姓名  学号  是否通过");
        for (int i=0;i<students.length;i++){
            System.out.println(students[i].name+" "+students[i].sno+" "+students[i].calGrade());
        }
}}
